<extend name="_layout/main"/>
<block name="content">
    <div class="page-content">
        <div class="page-breadcrumbs">
            <ul class="breadcrumb">
                <li>
                    <i class="fa fa-home"></i>
                    <a href="{:U('dashboard/index')}">系统首页</a>
                </li>
                <li class="active">商品订单管理</li>
            </ul>
        </div>

        <div class="page-body">
            <div class="row">
                <div class="col-lg-12 col-sm-12 col-xs-12">
                    <div class="widget">
                        <div class="widget-header bordered-left bordered-darkorange">
                            <span class="widget-caption">搜索</span>
                        </div>
                        <div class="widget-body bordered-left bordered-warning">
                            <form class="form-inline" role="form">
                                <div class="form-group">
                                    <input type="text" class="form-control" name="order_id" placeholder="订单号"
                                           value="{$Think.request.order_id}">
                                </div>
                                <div class="form-group">
                                    <input type="text" class="form-control" name="nickname" placeholder="会员"
                                           value="{$Think.request.nickname}">
                                </div>

                                <div class="form-group">
                                    <select name="order_status">
                                        <option value="">全部状态</option>
                                        <option value="1"
                                        <eq name="Think.request.order_status" value="1">selected</eq>
                                        >已支付，待发货</option>
                                        <option value="2"
                                        <eq name="Think.request.order_status" value="2">selected</eq>
                                        >已发货，待收货</option>
                                        <option value="3"
                                        <eq name="Think.request.order_status" value="3">selected</eq>
                                        >已收货，待评价</option>
                                        <option value="4"
                                        <eq name="Think.request.order_status" value="4">selected</eq>
                                        >已评价</option>
                                        <option value="5"
                                        <eq name="Think.request.order_status" value="5">selected</eq>
                                        >已取消</option>
                                    </select>
                                </div>

                                <button type="submit" class="btn btn-default">搜索</button>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-12 col-md-12">
                    <div class="widget">

                        <table class="table table-hover" id="searchable">
                            <thead class=" ">
                            <tr role="row">
                                <th class="text-center">订单号</th>
                                <th>会员</th>
                                <th class="text-center">订单金额</th>
                                <th class="text-center">下单时间</th>
                                <th class="text-center">状态</th>
                                <th class="text-center">备注</th>
                                <th class="text-center" width="180">操作</th>
                            </tr>
                            </thead>

                            <tbody>
                            <notempty name="result">
                                <volist name="result" id="val" mod="2">
                                    <tr>
                                        <td class="text-center">{$val.order_id}</td>
                                        <td>{$val.nickname}</td>
                                        <td class="text-center">【现金{$val.order_balance}】 【积分{$val.order_integral}】
                                            【商品券{$val.order_coupon}】</td>

                                        <td class="text-center">{$val.created_at|format_time}</td>
                                        <td class="text-center">
                                            {:orderStatus($val['order_status'])}
                                        </td>
                                        <td class="text-center">
                                            <egt name="val.order_status" value="1">
                                                支付：{$val.payed_at|format_time}
                                            </egt>
                                            <egt name="val.order_status" value="2">
                                                发货：{$val.express_at|format_time}
                                                快递单号:{$val.express_code}
                                            </egt>
                                        </td>
                                        <td class="text-center">
                                            <a href="{:U('GoodsOrder/detail',['id'=>$val['id']])}"
                                               class="btn btn-default btn-xs black"><i class="fa fa-tasks"></i> 详细</a>
                                            <a href="{:U('GoodsOrder/delete',['id'=>$val['id']])}"
                                               class="btn btn-danger btn-xs white" data-confirm="确定删除该订单?"><i
                                                    class="fa fa-trash-o"></i>删除</a>
                                        </td>
                                    </tr>
                                </volist>
                                <else/>
                                <tr>
                                    <td colspan="7" align="center">没有数据</td>
                                </tr>
                            </notempty>
                            </tbody>
                        </table>
                        <div class="row DTTTFooter">
                            <div class="col-sm-6">
                                <div class="dataTables_info" id="simpledatatable_info" role="status" aria-live="polite">

                                </div>
                            </div>
                            <div class="col-sm-6">
                                <div class="dataTables_paginate paging_bootstrap" id="simpledatatable_paginate">
                                    {$page}
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </div>
        <!-- /Page Body -->
    </div>
</block>
<block name="footer">

</block>